
\begin{tikzpicture}[scale=.5]
  \draw[gray, very thin] (0,0) grid (10,10);
  \filldraw[opafill=red, thick] (0,5) -- (1,3) -- (3,2) -- (4,2)
    -- (4,1) -- (6,1) -- (7,2) -- (7,3) -- (8,4) -- (7,4) -- (7,5)
    -- (8,6) -- (8,5) -- (9,6) -- (9,7) -- (10,8) -- (9,8) -- (8,9)
    -- (6,8) -- (7,7) -- (5,6) -- (4,6) -- (2,7) -- cycle;
  \draw[->, very thick] (-1,0) -- (0,0) node[above right] {$O$}
    -- (11,0) node[below] {$x$};
  \draw[->, very thick] (0,-1) -- (0,11) node[left] {$y$};
  \foreach \x/\y in {1/4,1/5,2/3,2/4,2/5,2/6,3/3,3/4,3/5,3/6,4/3,
      4/4,4/5,5/2,5/3,5/4,5/5,6/2,6/3,6/4,6/5,6/6,7/6,7/8,8/7,8/8} {
    \fill[red] (\x,\y) circle (3pt); }
  \foreach \x/\y in {0/5,1/3,1/6,2/7,3/2,4/1,4/2,4/6,5/1,5/6,6/1,
      6/8,7/2,7/3,7/4,7/5,7/7,8/4,8/5,8/6,8/9,9/6,9/7,9/8,10/8} {
    \fill[blue] (\x,\y) circle (3pt); }
  \node[at={(5,-2.4)}, anchor=center] (text) {
    \begin{minipage}{6cm} \centering
      \tikz \fill[red] (0,1pt) circle (3pt); $ = 26$, \tikz \fill[blue] (0,1pt) circle (3pt); $ = 25$, \\
        $S = \tikz \fill[red] (0,1pt) circle (3pt); + \sfrac12\ \tikz \fill[blue] (0,1pt) circle (3pt); - 1$ \\
        $\phantom{S} = 26 + \sfrac12\times25 - 1 = 37.5$ \\
    \end{minipage}
  };
\end{tikzpicture}
